#include <QMessageBox>
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "logindialog.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_actionExit_triggered()
{
    close();
}

void MainWindow::on_actionAbout_triggered()
{
    QString versionStr =
            "<p><b>kintai655</b><br/>"
            "1.1.0<br/>"
            "Copyright(c) 2013-2014 Rococo Co., Ltd. All right reserved."
            "<hr/>"
            "<a href=\"http://qt-project.org/\">Qt 5.1.0</a><br/>"
            "<a href=\"http://findicons.com/icon/237868/preferences_system_time?id=396842\">Time Icon from Oxgen Icon Pack</a><br/>"
            "</p>";

    QMessageBox::about(this, tr("kintai"), versionStr);
}

void MainWindow::on_actionAboutQt_triggered()
{
    QMessageBox::aboutQt(this);
}

void MainWindow::on_actionLogin_triggered()
{
    LoginDialog dlg;
    dlg.exec();
}
